package com.bobi.tfca.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bobi.tfca.model.entity.GroupEntity;
import com.bobi.tfca.model.vo.ChatRoom;
import com.bobi.tfca.model.vo.MemberVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 群服务层
 * @author 李文发
 * @date 2024/4/3
 */
public interface GroupService extends IService<GroupEntity> {
    List<ChatRoom> findAllChatRooms(Integer memberId);

    void editGroupName(Integer groupId, String groupName);

    Boolean disbandGroup(Integer groupId);

    Boolean addMember2Group(Integer groupId, List<Integer> choseMemberIdList);

    List<MemberVO> findAllGroupMembers(Integer groupId);

    Boolean createGroup(Integer groupOwnerId, String groupName, List<Integer> choseMemberIdList);

    Boolean removeMembers(List<Integer> memberIds, Integer groupId);

    Boolean incrementGroupNum(Integer groupId, int num);

    List<MemberVO> getGroupMemberHeadList(Integer groupId);

    String changeGroupHead(Integer groupId, MultipartFile file);
}
